package l.l.test;

/**
 * Created by llw on 2017/11/21.
 */
public class B extends A{

    public B(){
        System.out.println("B的构造方法");
    }
    public int k = print();

    public int print(){
        System.out.println("B print");
        return 522;
    }

    public static void main(String[] args) {
        System.out.println("main start");
        B t1 = new B();
    }
}
class A{
    public  A(){
        System.out.println("A的构造方法");
    }
    public int j = print();

    public int print(){
        System.out.println("A print");
        return 521;
    }
}